<%-- 
    Document   : Panier
    Created on : 8 déc. 2012, 11:21:37
    Author     : Vinu
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"
        import="java.util.List,com.myapp.struts.Film,java.lang.String"
       
        %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@include file="commun.jsp" %>
<%= entete("BOUTIKONLINE")%>
<%@include file="Header.jsp" %>

<div class="texte">
    <center>
        <%-- <jsp:useBean id="panier" scope="session" type="java.util.ArrayList"/> --%>
        
        <jsp:useBean id="panier" scope="session" class="com.myapp.struts.Panier"/>

            <table border="1"  >
            <tr bgcolor="#00BBBB">
                    <th>Nom</th>
                    <th>Prix</th>
                    <th>Supprimer de panier</th>
            </tr>
            <%

                    for ( int i=0; i < panier.size(); i++ )
                    {
                            Film film = (Film) panier.getFilms().get(i);
                            
            %>
            <tr>
                    <td><%=film.getNom()%></td>
                    <td><%=film.getPrix()%></td>
                    <td> <html:form action="/supprimerPanier">
                            <html:hidden name="Film" property="nom" value="<%=film.getNom()%>" />
                            <html:submit styleClass="text-button" value="Supprimer" />
                        </html:form>
            <%
                    }                    
            %>
            </td>
            </tr>
            <tr><td><%=panier.getPrix()%></td></tr>
            </table>
            
            <a href="Commander.jsp" ><input type="button" value="Commander"/> </a>
          </center>  
              
</div>

<%@include file="Pied.jsp" %>
